[gd_scene load_steps=8 format=3 uid="uid://b6538d78173ax"]

[ext_resource type="Script" path="res://Scripts/world.gd" id="1_7e2h0"]
[ext_resource type="PackedScene" uid="uid://ha1x5ps7eb2x" path="res://Scenes/sandbox.tscn" id="2_yc6nu"]

[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_eapq7"]
sky_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
ground_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)

[sub_resource type="Sky" id="Sky_lw6ll"]
sky_material = SubResource("ProceduralSkyMaterial_eapq7")

[sub_resource type="Environment" id="Environment_gdubw"]
background_mode = 2
sky = SubResource("Sky_lw6ll")
tonemap_mode = 2
glow_enabled = true

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_eqe6c"]
bg_color = Color(0.753026, 0.200376, 0, 1)

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_7xe1e"]
bg_color = Color(0, 0.721569, 0.0156863, 1)

[node name="World" type="Node"]
script = ExtResource("1_7e2h0")

[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(-0.866025, -0.433013, 0.25, 0, 0.5, 0.866025, -0.5, 0.75, -0.433013, 0, 0, 0)
shadow_enabled = true

[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_gdubw")

[node name="UI" type="CanvasLayer" parent="."]

[node name="MainMenu" type="PanelContainer" parent="UI"]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -241.0
offset_top = -207.0
offset_right = 241.0
offset_bottom = 208.0
grow_horizontal = 2
grow_vertical = 2

[node name="MarginContainer" type="MarginContainer" parent="UI/MainMenu"]
layout_mode = 2
size_flags_vertical = 4
theme_override_constants/margin_left = 15
theme_override_constants/margin_top = 15
theme_override_constants/margin_right = 15
theme_override_constants/margin_bottom = 15

[node name="VBoxContainer" type="VBoxContainer" parent="UI/MainMenu/MarginContainer"]
layout_mode = 2
theme_override_constants/separation = 15

[node name="Label" type="Label" parent="UI/MainMenu/MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 24
text = "Main Menu"
horizontal_alignment = 1
vertical_alignment = 1

[node name="HostLANButton" type="Button" parent="UI/MainMenu/MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 32
text = "Host (LAN)
"

[node name="JoinLANButton" type="Button" parent="UI/MainMenu/MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 32
text = "Join (LAN)
"

[node name="HostUPNPButton" type="Button" parent="UI/MainMenu/MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 32
text = "Host (UPNP)
"

[node name="JoinUPNPButton" type="Button" parent="UI/MainMenu/MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 32
text = "Join (UPUP)
"

[node name="AddressEntry" type="LineEdit" parent="UI/MainMenu/MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 32
placeholder_text = "Enter Address to Join Here"
alignment = 1

[node name="HUD" type="Control" parent="UI"]
visible = false
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 4
size_flags_vertical = 0
mouse_filter = 2

[node name="HealthBar" type="ProgressBar" parent="UI/HUD"]
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -236.0
offset_top = 60.0
offset_right = 236.0
offset_bottom = 99.0
grow_horizontal = 2
theme_override_styles/background = SubResource("StyleBoxFlat_eqe6c")
theme_override_styles/fill = SubResource("StyleBoxFlat_7xe1e")
max_value = 3.0
value = 3.0
show_percentage = false

[node name="MultiplayerSpawner" type="MultiplayerSpawner" parent="."]
_spawnable_scenes = PackedStringArray("res://Scenes/player.tscn")
spawn_path = NodePath("..")

[node name="Sandbox" parent="." instance=ExtResource("2_yc6nu")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -5.39031, 13.8718)

[connection signal="pressed" from="UI/MainMenu/MarginContainer/VBoxContainer/HostLANButton" to="." method="_on_host_lan_button_pressed"]
[connection signal="pressed" from="UI/MainMenu/MarginContainer/VBoxContainer/HostLANButton" to="." method="_on_host_button_pressed"]
[connection signal="pressed" from="UI/MainMenu/MarginContainer/VBoxContainer/JoinLANButton" to="." method="_on_join_lan_button_pressed"]
[connection signal="pressed" from="UI/MainMenu/MarginContainer/VBoxContainer/JoinLANButton" to="." method="_on_join_button_pressed"]
[connection signal="pressed" from="UI/MainMenu/MarginContainer/VBoxContainer/HostUPNPButton" to="." method="_on_host_upnp_button_pressed"]
[connection signal="pressed" from="UI/MainMenu/MarginContainer/VBoxContainer/HostUPNPButton" to="." method="_on_host_button_pressed"]
[connection signal="pressed" from="UI/MainMenu/MarginContainer/VBoxContainer/JoinUPNPButton" to="." method="_on_join_upnp_button_pressed"]
[connection signal="pressed" from="UI/MainMenu/MarginContainer/VBoxContainer/JoinUPNPButton" to="." method="_on_join_button_pressed"]
[connection signal="spawned" from="MultiplayerSpawner" to="." method="_on_multiplayer_spawner_spawned"]
